/*
package com.imooc.controller;

import org.apache.logging.log4j.Logger;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import springfox.documentation.annotations.ApiIgnore;

import org.apache.logging.log4j.LogManager;

@ApiIgnore //该controller就不会在api文档中出现
@RestController //默认所有请求返回的都是json对象
public class Log4jController {

    final static Logger logger = LogManager.getLogger(Log4jController.class);

    @GetMapping("/hello")
    public Object hello() {

        logger.debug("debug: hello~");
        logger.info("info: hello~"); //会打印info及以上日志级别 因为log4j.properties里设置了log4j.appender.stdout.threshold=INFO
        logger.warn("warn: hello~");
        logger.error("error: hello~");

        return "Hello World~";
    }

}
*/
